package com.book.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 书本表
 * </p>
 *
 * @author auto
 * @since 2025-04-02 06:38:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("books")
@Schema(name = "Books对象", description = "书本表")
public class Books {

    @Schema(name = "书本ID")
    @TableId(value = "book_id", type = IdType.ASSIGN_UUID)
    private String bookId;

    @Schema(name = "书名")
    @TableField("name")
    private String name;

    @Schema(name = "作者")
    @TableField("author")
    private String author;

    @Schema(name = "介绍")
    @TableField("introduction")
    private String introduction;

    @Schema(name = "新旧程度")
    @TableField("book_condition")
    private String bookCondition;

    @Schema(name = "去处（用户ID）")
    @TableField("destination")
    private String destination;

    @Schema(name = "状态编码")
    @TableField("status_code")
    private String statusCode;

    @Schema(name = "状态名称（可售、已售、待审核）")
    @TableField("status_name")
    private String statusName;

    @Schema(name = "金额")
    @TableField("price")
    private BigDecimal price;

    @Schema(name = "是否可用积分兑换（0否1是）")
    @TableField("is_points")
    private Integer isPoints;

    @Schema(name = "可兑换积分")
    @TableField("points")
    private Integer points;

    @Schema(name = "书本类别ID")
    @TableField("book_category_id")
    private String bookCategoryId;

    @Schema(name = "用户ID,来源")
    @TableField("user_id")
    private String userId;

    @Schema(name = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(name = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(name = "书本图片")
    @TableField("picture")
    private String picture;

    @Schema(name = "0自1配")
    @TableField("deliveryId")
    private Integer deliveryId;

    @Schema(name = "自提地址")
    @TableField("place")
    private String place;

    @Schema(name = "书本详情ID")
    @TableField("book_detail_id")
    private String bookDetailId;

    @Schema(name = "原价")
    @TableField("origin_price")
    private BigDecimal originPrice;

    @Schema(name = "购买时间")
    @TableField("purchase_date")
    private Date purchaseDate;

    @Schema(name = "是否回收0否1是")
    @TableField("choose_reuse")
    private Integer chooseReuse;

}
